﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Orders
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<script type="text/javascript">
    function addQuery(s) {
        return s;
    }
</script>

<h2>Orders</h2>

<a href="/Order/Create" id="lnkCreate" mx-route='[{"command": "mxPlugin.dynamic.dialog", "action": "addQuery", "width": "360"}]'>+new</a>

<table width="100%">
<tr valign="top"><td>
<div id="orderListPanel" mx-src="/Order/List" mx-route='[{ "selector": ".details", "command": "mxPlugin.dynamic.retarget", "target": "#orderDetails"}]'></div>
</td>
<td><div id="orderDetails" title="Order details" mx-route='[{"command": "mxPlugin.dynamic.dialog", "width": "360"}]'></div>
</td></tr>
<tr><td colspan="2">
<div id="result" mx-asyncResult="true"></div>
</td></tr>
</table>
<div id="dialog" mx-dialogTarget="true"></div>
</asp:Content>
